<?php


$config = array(

    // This is a authentication source which handles admin authentication.
    'admin' => array(
        // The default is to use core:AdminPassword, but it can be replaced with
        // any authentication source.

        'core:AdminPassword',
    ),


    // An authentication source which can authenticate against both SAML 2.0
    // and Shibboleth 1.3 IdPs.
    'default-sp' => array(
        'saml:SP',

        // The entity ID of this SP.
        // Can be NULL/unset, in which case an entity ID is generated based on the metadata URL.
        {% if saml_secret.sp_entity_id is defined %}
        'entityID' => '{{ saml_secret.sp_entity_id }}',
        {% elif saml_public.sp_entity_id is defined %}
        'entityID' => '{{ saml_public.sp_entity_id }}',
        {% else %}
        'entityID' => null,
        {% endif %}

        'NameIDPolicy' => '{{ saml_public.name_id_policy }}',

        // The entity ID of the IdP this should SP should contact.
        // Can be NULL/unset, in which case the user will be shown a list of available IdPs.
        {% if saml_secret.idp_entity_id is defined %}
        'idp' => '{{ saml_secret.idp_entity_id }}',
        {% elif saml_public.idp_entity_id is defined %}
        'idp' => '{{ saml_public.idp_entity_id }}',
        {% else %}
        // neither {{ saml_secret.idp_entity_id }} nor {{ saml_public.idp_entity_id }} is defined
        {% endif %}


        // The URL to the discovery service.
        // Can be NULL/unset, in which case a builtin discovery service will be used.
        'discoURL' => null,
    ),
);
